<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>排班列表管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/phy/fSchedue/">排班列表列表</a></li>
		<li class="active"><a href="${ctx}/phy/fSchedue/form?id=${fSchedue.id}">排班列表<shiro:hasPermission name="phy:fSchedue:edit">${not empty fSchedue.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="phy:fSchedue:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="fSchedue" action="${ctx}/phy/fSchedue/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<form:hidden path="tenantId"/>
		<sys:message content="${message}"/>

		<div class="control-group">
			<label class="control-label">日期：</label>
			<div class="controls">
				<input type="text" class="input-medium" readonly  value="${fSchedue.scheduleYear}年${fSchedue.scheduleMonth}月${fSchedue.scheduleDay}日(${fSchedue.weekStr})">
			</div>
		</div>
		<c:forEach items="${templateList}" var="template" varStatus="n">
			<c:choose>
				<c:when test="${n.index eq 0}">
					<div class="control-group">
						<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次一</label>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">班次名称：</label>
							<div class="controls">
								<form:input path="titleA" htmlEscape="false" maxlength="32" class="input-medium required"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">号源数：</label>
							<div class="controls">
								<form:input path="totalA" htmlEscape="false" maxlength="11" class="input-mini required"/>
								(剩余号源：${fSchedue.countA})
							</div>
						</div>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">开始时间：</label>
							<div class="controls">
								<input name="beginDateA" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.beginDateA}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">结束时间：</label>
							<div class="controls">
								<input name="endDateA" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.endDateA}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</c:when>
				<c:when test="${n.index eq 1}">
					<div class="control-group">
						<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次二</label>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">班次名称：</label>
							<div class="controls">
								<form:input path="titleB" htmlEscape="false" maxlength="32" class="input-medium required"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">号源数：</label>
							<div class="controls">
								<form:input path="totalB" htmlEscape="false" maxlength="11" class="input-mini required"/>
								(剩余号源：${fSchedue.countB})
							</div>
						</div>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">开始时间：</label>
							<div class="controls">
								<input name="beginDateB" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.beginDateB}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">结束时间：</label>
							<div class="controls">
								<input name="endDateB" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.endDateB}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</c:when>
				<c:when test="${n.index eq 2}">
					<div class="control-group">
						<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次三</label>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">班次名称：</label>
							<div class="controls">
								<form:input path="titleC" htmlEscape="false" maxlength="32" class="input-medium required"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">号源数：</label>
							<div class="controls">
								<form:input path="totalC" htmlEscape="false" maxlength="11" class="input-mini required"/>
								(剩余号源：${fSchedue.countC})
							</div>
						</div>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">开始时间：</label>
							<div class="controls">
								<input name="beginDateC" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.beginDateC}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">结束时间：</label>
							<div class="controls">
								<input name="endDateC" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.endDateC}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</c:when>
				<c:when test="${n.index eq 3}">
					<div class="control-group">
						<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次四</label>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">班次名称：</label>
							<div class="controls">
								<form:input path="titleD" htmlEscape="false" maxlength="32" class="input-medium required"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">号源数：</label>
							<div class="controls">
								<form:input path="totalD" htmlEscape="false" maxlength="11" class="input-mini required"/>
								(剩余号源：${fSchedue.countD})
							</div>
						</div>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">开始时间：</label>
							<div class="controls">
								<input name="beginDateD" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.beginDateD}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">结束时间：</label>
							<div class="controls">
								<input name="endDateD" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.endDateD}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</c:when>
				<c:when test="${n.index eq 4}">
					<div class="control-group">
						<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次五</label>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">班次名称：</label>
							<div class="controls">
								<form:input path="titleE" htmlEscape="false" maxlength="32" class="input-medium required"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">号源数：</label>
							<div class="controls">
								<form:input path="totalE" htmlEscape="false" maxlength="11" class="input-mini required"/>
								(剩余号源：${fSchedue.countE})
							</div>
						</div>
					</div>
					<div class="control-group">
						<div style="display: inline-block">
							<label class="control-label">开始时间：</label>
							<div class="controls">
								<input name="beginDateE" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.beginDateE}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
						<div style="display: inline-block">
							<label class="control-label">结束时间：</label>
							<div class="controls">
								<input name="endDateE" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
									   value="${fSchedue.endDateE}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</c:when>
			</c:choose>
		</c:forEach>
<%--		<c:if test="${not empty fSchedue.countA}">--%>
<%--			<div class="control-group">--%>
<%--				<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次一</label>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">班次名称：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="titleA" htmlEscape="false" maxlength="32" class="input-medium required"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">号源数：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="totalA" htmlEscape="false" maxlength="11" class="input-mini required"/>--%>
<%--						(剩余号源：${fSchedue.countA})--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">开始时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="beginDateA" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.beginDateA}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">结束时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="endDateA" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.endDateA}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--		</c:if>--%>

<%--		<c:if test="${not empty fSchedue.countB}">--%>
<%--			<div class="control-group">--%>
<%--				<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次二</label>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">班次名称：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="titleB" htmlEscape="false" maxlength="32" class="input-medium required"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">号源数：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="totalB" htmlEscape="false" maxlength="11" class="input-mini required"/>--%>
<%--						(剩余号源：${fSchedue.countB})--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">开始时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="beginDateB" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.beginDateB}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">结束时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="endDateB" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.endDateB}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--		</c:if>--%>

<%--		<c:if test="${not empty fSchedue.countC}">--%>
<%--			<div class="control-group">--%>
<%--				<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次三</label>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">班次名称：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="titleC" htmlEscape="false" maxlength="32" class="input-medium required"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">号源数：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="totalC" htmlEscape="false" maxlength="11" class="input-mini required"/>--%>
<%--						(剩余号源：${fSchedue.countC})--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">开始时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="beginDateB" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.beginDateC}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">结束时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="endDateC" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.endDateC}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--		</c:if>--%>

<%--		<c:if test="${not empty fSchedue.countD}">--%>
<%--			<div class="control-group">--%>
<%--				<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次四</label>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">班次名称：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="titleD" htmlEscape="false" maxlength="32" class="input-medium required"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">号源数：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="totalD" htmlEscape="false" maxlength="11" class="input-mini required"/>--%>
<%--						(剩余号源：${fSchedue.countD})--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">开始时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="beginDateD" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.beginDateD}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">结束时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="endDateD" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.endDateD}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--		</c:if>--%>

<%--		<c:if test="${not empty fSchedue.countE}">--%>
<%--			<div class="control-group">--%>
<%--				<label class="control-label" style="font-size: 20px;font-weight: bold; margin-left: 20px;">班次五</label>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">班次名称：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="titleE" htmlEscape="false" maxlength="32" class="input-medium required"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">号源数：</label>--%>
<%--					<div class="controls">--%>
<%--						<form:input path="totalE" htmlEscape="false" maxlength="11" class="input-mini required"/>--%>
<%--						(剩余号源：${fSchedue.countE})--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--			<div class="control-group">--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">开始时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="beginDateE" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.beginDateE}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--				<div style="display: inline-block">--%>
<%--					<label class="control-label">结束时间：</label>--%>
<%--					<div class="controls">--%>
<%--						<input name="endDateE" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"--%>
<%--							   value="${fSchedue.endDateE}" onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>--%>
<%--					</div>--%>
<%--				</div>--%>
<%--			</div>--%>
<%--		</c:if>--%>

		<div class="control-group">
			<label class="control-label">备注信息：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="phy:fSchedue:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>
